import React, { Component } from 'react'
import { View, Image, StyleSheet } from 'react-native'
import { createImageProgress } from 'react-native-image-progress'
import FastImage from 'react-native-fast-image'
const CaceImage = createImageProgress(FastImage)
import { WINDOW } from '../Services'

const LdImage = ({ style, url, placeholer, sex}) => (  
  <View style={style}> 
  <Image source={placeholer ||  require('../Images/default.png')  }style={[StyleSheet.absoluteFill,{...style}]} />
  <CaceImage  
        style={{...style}}
        imageStyle={{...style, overflow: 'hidden'}}
        source={{ uri: WINDOW.getFullImage(url), priority: FastImage.priority.normal }}
        resizeMode={FastImage.resizeMode.cover} />
  </View>
)

export default LdImage